<!--  -->
<template>
  <el-button :plain="true" @click="open4">error</el-button>
  {{ props.MesStyle }}
</template>

<script lang="ts" setup>
//这里可以导入其他文件（比如：组件，工具js，第三方插件js，json文件，图片文件等等）
//例如：import 《组件名称》 from '《组件路径》';
import { ref,defineProps } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";

const props=defineProps({
    MesStyle:{
        type:Object,
        default:{
            msg:'123'
        }
    }
})
const title = ref("是否确认？");
const open4 = () => {
  ElMessageBox.confirm(props.MesStyle, "Warning", {
    confirmButtonText: "OK",
    cancelButtonText: "Cancel",
    type: "warning",
  })
    .then(() => {
      ElMessage({
        type: "success",
        message: "Delete completed",
      });
    })
    .catch(() => {
      ElMessage({
        type: "info",
        message: "Delete canceled",
      });
    });
};
</script>
<style lang="scss" scoped></style>
